package exceptionExercise;

import java.io.FileOutputStream;
import java.io.IOException;

public class FinallyDemo2 {
    public static void main(String[] args) {
        FileOutputStream fos=null;
        try{
             fos=new FileOutputStream("./a/b/c/fos.txt");
            fos.write(0);


        }catch (IOException e){
            System.out.println("文件流异常，并解决了");
        }finally {
            try {
                fos.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
